package org.nimi317.web_gis.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.nimi317.web_gis.entity.Permission;

import java.util.List;

/**
 * <p>
 * 权限 服务类
 * </p>
 *
 * @author nimi317
 * @since 2024-04-13
 */
public interface IPermissionService extends IService<Permission> {

    //新增权限
    void addPermission(Permission permission);

    //删除权限
    void deletePermission(Integer id);

    //修改权限
    void updatePermission(Permission permission);

    //查询所有权限
    List<Permission> findAllPermission();

    //关联角色和权限
    void addRolePermission(Integer roleId, List<Integer> permissionId);

    //根据用户id查询权限
    List<String> findPermissionByUserId(Integer userId);
}
